#include<bits/stdc++.h>
#define int long long
#define ls(x) ((x)*2)
#define rs(x) ((x)*2+1)
#define Debug(...) fprintf(stderr, __VA_ARGS__)
#define For(i,a,b) for(int i=a,i##end=b;i<=i##end;i++)
#define Rof(i,a,b) for(int i=a,i##end=b;i>=i##end;i--)
#define rep(i,  b) for(int i=1,i##end=b;i<=i##end;i++)
using namespace std;
const int N=5e5+5,Mod=998244353;
//char buf[(1<<21)+5],*p1,*p2;
//#define getchar() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++)
void chmx(int &x,int y){(x<y)&&(x=y);}
void chmn(int &x,int y){(x>y)&&(x=y);}
typedef __int128_t i128;
i128 _base=1;
inline int mol(int x){return x-Mod*(_base*x>>64);}
inline void Add(int &x,int y){x=mol(x+y+Mod);}
inline int read(){
	int f=0,x=0;
	char ch=getchar();
	while(!isdigit(ch)){f|=(ch=='-');ch=getchar();}
	while(isdigit(ch)){x=(x<<3)+(x<<1)+(ch^48);ch=getchar();}
	return f?-x:x;
}
int n,Q;
int xa[N],ya[N],xb[N],yb[N];
int a[N],tot1,b[N],tot2;
int y[N];

struct XXX{
	int L,R;
	int l,r;
	int sum,lz,rev;
}tr[N<<2];
inline void pushup(int x){tr[x].sum=tr[ls(x)].sum+tr[rs(x)].sum;}
inline void down(int x,int k){
	tr[x].lz+=k;
	tr[x].rev+=k;
	if(tr[x].rev>0)tr[x].sum=(tr[x].r-tr[x].l+1);
	else tr[x].sum=0;
	return;
}
inline void pushdown(int x){
	if(!tr[x].lz) return;
	down(ls(x),tr[x].lz);down(rs(x),tr[x].lz);
	tr[x].lz=0;
}
void build(int x,int l,int r){
	tr[x].l=tr[x].r=tr[x].sum=tr[x].lz=tr[x].rev=0;
	tr[x].L=l,tr[x].R=r;
	tr[x].l=y[l-1];
	tr[x].r=y[r]-1;
	//~ cout<<x<<" "<<tr[x].l<<" "<<tr[x].r<<" "<<l<<" "<<r<<endl;
	if(l==r) return;
	int mid=(l+r)>>1;
	build(ls(x),l,mid);build(rs(x),mid+1,r);
}
void updata(int x,int l,int r,int p){
	//~ cout<<x<<" "<<tr[x].l<<" "<<tr[x].r<<" "<<l<<" "<<r<<endl;
	if(l<=tr[x].l&&tr[x].r<=r){
		down(x,p);
		//~ cout<<tr[x].l<<" "<<tr[x].r<<" "<<p<<endl;
		return;
	}
	if(l>tr[x].r||r<tr[x].l) return;
	pushdown(x);
	updata(ls(x),l,r,p);
	updata(rs(x),l,r,p);
	pushup(x);
}
struct Seg{
	int x,l,r,id,k;
}z[N];
inline bool cmp(Seg a,Seg b){
	return a.x<b.x;
}
signed main(){
	_base=(_base<<64)/Mod;
	freopen("dierti.in","r",stdin);
	freopen("dierti.out","w",stdout);
	int id=read();
	n=read(),Q=read();
	int tot=0;
	For(i,1,n){
		xa[i]=read(),ya[i]=read(),xb[i]=read()-1,yb[i]=read()-1;
		b[++tot2]=ya[i];
		b[++tot2]=yb[i];
		b[++tot2]=ya[i]+1;
		b[++tot2]=yb[i]+1;
		b[++tot2]=ya[i]-1;
		b[++tot2]=yb[i]-1;
		z[++tot]={xa[i],ya[i],yb[i],i,1};
		z[++tot]={xb[i]+1,ya[i],yb[i],i,-1};
	}b[++tot2]=0;
	sort(z+1,z+tot+1,cmp);
	sort(b+1,b+tot2+1);
	int m2=unique(b+1,b+tot2+1)-b-1;
	int p=0;
	For(i,1,m2){
		y[++p]=b[i];
	}
	while(Q--){
		build(1,1,p);
		int l=read(),r=read();
		int ans=0;
		For(i,1,tot){
			if(l<=z[i].id&&z[i].id<=r){
				//~ cout<<i<<" "<<z[i].x<<" "<<z[i].l<<" "<<z[i].r<<" "<<z[i].k<<" "<<endl;
				updata(1,z[i].l,z[i].r,z[i].k);
			}
			//~ cout<<z[i].x<<" "<<z[i+1].x<<" "<<tr[1].sum<<endl;
			ans+=(z[i+1].x-z[i].x)*tr[1].sum;
		}
		printf("%lld\n",ans);
	}
#ifdef LOCAL
    Debug("\nMy Time: %.3lfms\n", (double)clock() / CLOCKS_PER_SEC);
#endif
	return 0;
}
